package com.ouyang.bo.api.aspectj;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * 接口拦截器次级类
 *
 * @author duanpj
 * @param
 * @date 2020/8/5
 */
@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {

  @Autowired
  private LoginUserInterceptor loginUserInterceptor;

  
  @Override
  public void addInterceptors(InterceptorRegistry registry) {
    super.addInterceptors(registry);
    registry.addInterceptor(loginUserInterceptor).addPathPatterns("/api/**").excludePathPatterns("/api/login/**");
  }

}
